import axios from "@/http/request.js";

//客服接口
const customerServiceApi = {
    //登录
    roleLogin(data) {
        return axios({
            method: "post",
            url: "/backstageRole/roleLogin",
            data,
        });
    },
    //客服个人信息展示
    customerServiceInfo(data) {
        return axios({
            method: "post",
            url: "/info/getCustomerServiceInfo",
            data,
        });
    },
    //头像
    uploadAvatar(data){
        return axios({
            method: "post",
            url: "/customer/avatar/update",
            data,
            headers: {
                'Content-Type': 'multipart/form-data'
            }
        });
    },
    //老板列表
    bossList(data) {
        return axios({
            method: "post",
            url: "/customer/getBossList",
            data,
        });
    },
    //陪玩列表
    playmateList(data) {
        return axios({
            method: "post",
            url: "/customerservice/getPlaymateList",
            data,
        });
    },
    //查询注册信息
    queryRegisterInfo(data) {
        return axios({
            method: "post",
            url: "/customerservice/getPlaymateReviewList",
            data,
        });
    },
    //审核陪玩
    reviewPlaymate(data) {
        return axios({
            method: "post",
            url: "/customerservice/upReview",
            data,
        });
    },
    //查看所有订单信息
    queryAllOrderInfo(data) {
        return axios({
            method: "post",
            url: "/customerOrder/getOrderList",
            data,
        });
    },
    // 处理申请：审批老板/打手发起的订单
    handOrderRequests(data) {
        return axios({
            method: "post",
            url: "/customerOrder/upOrderRequests",
            data,
        });
    },

    //查询售后订单列表
    queryAfterSaleOrderList(data) {
        return axios({
            method: "post",
            url: "/customerOrder/getAfterSalesList",
            data,
        });
    },
    //改售后状态、备注
    updateAfterSaleOrder(data) {
        return axios({
            method: "post",
            url: "/customerOrder/upAfterSales",
            data,
        });
    },
};
export default customerServiceApi;
